It is known in the relevant art that specified chemical compounds can be used to improve well stimulation. However, the transportation, storage, mixing, and delivering of the stimulation chemicals to subsurface has many issues. Highly reactive materials have even more issues when safety concerns are factored. It is problematic if a specified chemical is unstable at the surface. This instability can cause health, safety and/or environmental problems.
One method of reducing such risks is to produce the required, unstable chemical compounds in close proximity to the stimulation chemical delivery location, which is usually a remote location. Thus, if a problem resulting from chemical instability were to occur, the problem would be essentially confined to the well location. There would be a small risk of negatively impacting a local environment, and use of the chemical under such controlled conditions would deem it to be less of a hazard.
In the case of a remote or hazardous location, the option of creating a chemical downhole has advantages. Chemical reactions at high temperature and pressure can benefit from being formed in a borehole where high pressures and temperatures co-exist. Electrical power is used for processing certain useful chemicals. Power generation on a remote rig is not an issue. Raw materials for many chemicals are present in sea water or can be mined proximal to the rig. Using resources proximal to remote site has many beneficial characteristics.